function execute_animations(animations){
	animations.each(function(){
		execute_animation($(this));
		//alert(this);
	});
}

function execute_animation(animation_div){
	var elem_id = animation_div.find("span.elem-id").text();
	var animation_name = animation_div.find("span.name").text();
	
	var option_str = "{";
	animation_div.find("table.options tr").each(function(){
		var option = $(this).find("td:eq(0)").text();
		var value = $(this).find("td:eq(1)").text();
		
		option_str += '"' + option + '":"' + value + '",' ;
	});
	if (option_str.length > 1) option_str = option_str.substring(0, option_str.length - 1);
	option_str += "}";
	
	//alert(option_str);
	//return;
	
	var options = jQuery.parseJSON(option_str);
	options = $.extend({  
        time : "2000"
    }, options);
	
	if (animation_name == "animate"){
		$("#"+elem_id).animate(options, parseInt(options.time));
	}
	else if (animation_name == "fadeIn"){
		$("#"+elem_id).fadeIn(parseInt(options.time));
	}
	else if (animation_name == "fadeOut"){
		$("#"+elem_id).fadeOut(parseInt(options.time));
	}
}